package logic.user;

import java.net.URI;
import java.net.URISyntaxException;

import core.lib.interfaces.ICRequestCallback;
import core.lib.model.CoreRequest;
import core.lib.tools.CoreLog;

public class UserLogicUnit extends BaseLogicUnit implements ICRequestCallback
{
	private final URI mLogicURI;

	public UserLogicUnit() throws URISyntaxException
	{
		super();

		mLogicURI = new URI("weaver://logic/user");
	}

	@Override
	public void handleRequest(CoreRequest req)
	{
		if (req != null)
		{
			String action = Utility.getPartIIFromPath(req.getURI());

			if (UserLogicConstants.PARAM_ACTION_NAV.equals(action))
			{
				doLogic_NAV(req);
			}
			else
			{
				CoreLog.log(CoreLog.TAG_LOGIC, "不能处理的业务！");
			}
		}
	}

	@Override
	public void onRequestFinshed(CoreRequest req)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void onRequestError(CoreRequest req, int errorCode, String desc)
	{
		// TODO Auto-generated method stub

	}

	@Override
	protected URI doGetLogicUnitUri()
	{
		return mLogicURI;
	}

	private void doLogic_NAV(CoreRequest req)
	{

	}
}
